package la.iok.hzsvn.lewin.movie.entity;

import la.iok.hzsvn.share.collection.IdAble;

import java.util.Objects;

/**
 * 剧本
 */
public class Movie implements IdAble<Long> {
    public static final int STATUS_ONLINE = 0;
    public static final int STATUS_OFFLINE = 1;
    private Long id;
    /**
     * 创建剧本的用户id.
     */
    private Long userId;
    /**
     * 剧本所属组织。同一个组织内的不同用户上传的剧本,可以互相访问和修改
     */
    private Long orgUnitId;
    /**
     * 名称
     */
    private String name;
    /**
     * 作者
     */
    private String author;
    /**
     * 配置的封面图路径
     */
    private String cover;
    /**
     * 封面图文件id。MovieCoverFile表中的id
     */
    private Long coverFileId;
    /**
     * 剧本手册文件路径。doc文档
     */
    private String assist;
    /**
     * 剧本手册文件id。doc文档
     */
    private Long assistFileId;
    /**
     * 版本
     */
    private String version;
    /**
     * 标签数组
     */
    private String tag;
    /**
     * 简介
     */
    private String brief;
    /**
     * 最少玩家数量
     */
    private Integer minPlayers;
    /**
     * 最大玩家数量
     */
    private Integer maxPlayers;
    /**
     * 剧本总的开本数量
     */
    private Integer playTimes;
    /**
     * 持续时长
     */
    private Float duration;
    /**
     * 状态位。0表示正常状态,1表示已经下线
     */
    private Integer status;
    /**
     * 剧本级别id
     */
    private Long movieLevelId;

    @Override
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrgUnitId() {
        return orgUnitId;
    }

    public void setOrgUnitId(Long orgUnitId) {
        this.orgUnitId = orgUnitId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Long getCoverFileId() {
        return coverFileId;
    }

    public void setCoverFileId(Long coverFileId) {
        this.coverFileId = coverFileId;
    }

    public String getAssist() {
        return assist;
    }

    public void setAssist(String assist) {
        this.assist = assist;
    }

    public Long getAssistFileId() {
        return assistFileId;
    }

    public void setAssistFileId(Long assistFileId) {
        this.assistFileId = assistFileId;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }

    public Integer getMinPlayers() {
        return minPlayers;
    }

    public void setMinPlayers(Integer minPlayers) {
        this.minPlayers = minPlayers;
    }

    public Integer getMaxPlayers() {
        return maxPlayers;
    }

    public void setMaxPlayers(Integer maxPlayers) {
        this.maxPlayers = maxPlayers;
    }

    public Integer getPlayTimes() {
        return playTimes;
    }

    public void setPlayTimes(Integer playTimes) {
        this.playTimes = playTimes;
    }

    public Float getDuration() {
        return duration;
    }

    public void setDuration(Float duration) {
        this.duration = duration;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getMovieLevelId() {
        return movieLevelId;
    }

    public void setMovieLevelId(Long movieLevelId) {
        this.movieLevelId = movieLevelId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Movie movie = (Movie) o;
        return Objects.equals(id, movie.id) && Objects.equals(userId, movie.userId) && Objects.equals(name, movie.name)
                && Objects.equals(author, movie.author) && Objects.equals(cover, movie.cover)
                && Objects.equals(coverFileId, movie.coverFileId) && Objects.equals(version, movie.version)
                && Objects.equals(tag, movie.tag) && Objects.equals(brief, movie.brief)
                && Objects.equals(minPlayers, movie.minPlayers) && Objects.equals(maxPlayers, movie.maxPlayers)
                && Objects.equals(playTimes, movie.playTimes) && Objects.equals(duration, movie.duration)
                && Objects.equals(status, movie.status) && Objects.equals(movieLevelId, movie.movieLevelId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userId, name, author, cover, coverFileId, version, tag, brief, minPlayers, maxPlayers, playTimes, duration, status, movieLevelId);
    }
}
